package starfire.manager;

import java.awt.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 * <p>Title: JFtp</p>
 * <p>Description: ftp client</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author starfire
 * @version 1.0
 */

public class IconManager {

  private static IconManager manager = new IconManager();

  public static IconManager getManager()
  {
    return manager;
  }

  private IconManager() {
  }

  public ImageIcon get(String name)
  {
    return load(name);
  }

  private ImageIcon  load(String fileName)
  {
    try
    {
      ImageIcon icon = new ImageIcon(
          starfire.manager.icon.IconHelp.class.getResource(fileName));
      return icon;
    }catch (Exception e)
    {
      e.printStackTrace();
    }
    return null;
  }
}
